import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Game from '../pages/game.vue'
import Start from '../pages/start.vue'
import Question1 from '../pages/question1.vue'
import Question from '../pages/question.vue'
import End from '../pages/end.vue'

Vue.use(VueRouter)

const routes = [
  {path:'/',redirect:'start'},
  {path:'/game',component:Game},
  {path:'/start',component:Start},
  // {path:'/question1',component:Question1,name:'question1',},
  {path:'/question',component:Question,children:[
    {path:'/question1',component:Question1,name:'question1',meta:{
      keepAlive: true
    }}
  ]},
  {path:'/end',component:End}
]

const router = new VueRouter({
  routes
})

export default router
